<!--
  描述：产品组table页
  @author tanghongjun
  @since 2020-08-19 11:18:36
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<!--表格id与lay-filter属性一致，统一定义为zmn-table-->
<table class="layui-hide" id="zmn-table" lay-filter="zmn-table" th:fragment="table">
    <thead>
    <tr>
        <!--规定复选框列置于第1列，居中显示-->
        <th lay-data="{field:'sort', width:60, unresize:true, sort:true, align:'center', edit:'text', fixed:'left'}">排序</th>
        <th lay-data="{field:'id', width:80, unresize:true, align:'center'}">ID</th>
        <th lay-data="{field:'pictureType', align:'center'}">照片类型</th>
        <th lay-data="{field:'servCategName', width:120, align:'center'}">服务分类</th>
        <th lay-data="{field:'pictureNumber', width:120, unresize:true, align:'center'}">照片张数</th>
        <th lay-data="{field:'auditFlag', width:120, unresize:true, align:'center'}">后台审核</th>
        <th lay-data="{field:'autoAuditFlag', width:120, unresize:true, align:'center'}">自动审核</th>
        <th lay-data="{field:'requiredFlag', width:80, unresize:true, align:'center'}">必传</th>
        <th lay-data="{field:'pictureSrc',width:80, unresize:true, align:'center'}">示例图片</th>
        <th lay-data="{field:'createrAndCreateTime', unresize:true,width:230, align:'center'}">创建人/创建时间</th>
        <th lay-data="{field:'updaterAndUpdateTime', unresize:true,width:230, align:'center'}">最近修改人/时间</th>
        <!--规定操作列置于最后-->
        <th lay-data="{field:'操作', width:240, unresize:true, align:'center', fixed:'right'}">操作</th>
        <!--其他规范
            值较大的数字列居右显示，并使用千分号；值较小的数字列可居中显示，
            金额列统一居右显示，默认精确到小数点后2位，并使用千分号，
            通常情况下，时间或日期列靠后放置(操作列前)，居中显示
            -->
    </tr>
    </thead>
    <tbody>
    <tr th:each="item:${items}">
        <td th:text="${item.sort}">sort</td>
        <td th:text="${item.relateId}">id</td>
        <td th:text="${T(com.zmn.plat.common.dictionary.ChannelWorkOrderPictureTypeEnum).getName(item.pictureType)}">pictureType</td>
        <td th:text="${item.servCategName}">servCategName</td>
        <td th:text="${item.pictureNumber}">pictureNumber</td>
        <td>
            <div th:onmouseover="|show_tips(${(#authPermit.checkPermit('/channel/workorder/picture/updateAuditFlag.action'))},'请先开启开关权限',this)|">
                <input th:disabled="${(#authPermit.checkPermit('/channel/workorder/picture/updateAuditFlag.action'))?'false':'true'}" type="checkbox" name="auditFlag" id="auditFlag" th:key="${item.relateId}" th:value="${item.auditFlag}"
                       lay-text="ON|OFF" lay-skin="switch" lay-filter="chk_audit_flag" th:checked="${item.auditFlag == 2}"/>
            </div>
        </td>
        <td>
            <div th:onmouseover="|show_tips(${(#authPermit.checkPermit('/channel/workorder/picture/updateAutoAuditFlag.action'))},'请先开启开关权限',this)|">
                <input th:disabled="${(#authPermit.checkPermit('/channel/workorder/picture/updateAutoAuditFlag.action'))?'false':'true'}" type="checkbox" name="autoAuditFlag" id="autoAuditFlag" th:key="${item.relateId}" th:value="${item.autoAuditFlag}"
                       lay-text="ON|OFF" lay-skin="switch" lay-filter="chk_auto_audit_flag" th:checked="${item.autoAuditFlag == 2}"/>
            </div>
        </td>
        <td>
            <div th:onmouseover="|show_tips(${(#authPermit.checkPermit('/channel/workorder/picture/updateRequiredFlag.action'))},'请先开启开关权限',this)|">
                <input th:disabled="${(#authPermit.checkPermit('/channel/workorder/picture/updateRequiredFlag.action'))?'false':'true'}" type="checkbox" name="requiredFlag" id="requiredFlag" th:key="${item.relateId}" th:value="${item.requiredFlag}"
                       lay-text="ON|OFF" lay-skin="switch" lay-filter="chk_required_flag" th:checked="${item.requiredFlag == 2}"/>
            </div>
        </td>
        <td>
            <div th:if="${item.pictureSrc != '' and item.pictureSrc != null}">
                <a style="color: #00a0e9" href="#" th:id="${item.relateId}" th:onclick="previewImg([[${item.relateId}]])" th:src="${item.pictureSrc}">查看</a>
            </div>
        </td>
        <td th:text="${(item.creater != null ? item.creater+'/' : '')+T(com.zmn.common.utils.date.DateUtil).toString(item.createTime)}">createTime</td>
        <td th:text="${(item.updater != null ? item.updater+'/' : '')+T(com.zmn.common.utils.date.DateUtil).toString(item.updateTime)}">updateTime</td>
        <td>
            <div>
                <a th:if="${#authPermit.checkPermit('/channel/workorder/picture/addEditView.action')}" style="color: #00a0e9"
                   th:onclick="toEditWorkOrderPicture([[${item.channelId}]], [[${item.relateId}]])" href="#"
                   lay-text="修改" text="修改">修改</a>&nbsp;&nbsp;
                <a  th:if="${#authPermit.checkPermit('/channel/workorder/picture/auditStandard.action')}"  style="color: #00a0e9"
                   th:onclick="toAuditStandard([[${item.channelId}]], [[${item.relateId}]])" href="#"
                   lay-text="设置审核标准" text="设置审核标准">设置审核标准</a>&nbsp;&nbsp;
                <a th:if="${#authPermit.checkPermit('/channel/workorder/picture/delete.action')}" style="color: #00a0e9"
                   th:onclick="deleteWorkOrderPicture([[${item.relateId}]])" href="#"
                   lay-text="删除" text="删除">删除</a>
            </div>
        </td>
    </tr>
    </tbody>
</table>
